home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / utility3 / makemdi2.zip / CHART.H < prev    next >
C/C++ Source or Header  |  1992-11-25  |  3KB  |  86 lines

  1. #ifndef CLASS_CHART
  2. #define CLASS_CHART "MakeMDI_Chart"
  3. // ==========================================================Purpose 
  4. // CHART.H - MDI Chart window managment. 
  5. // 
  6. // MAKEMDI adaptation of Windows 3.1 SDK MAKEAPP system. 
  7. // 
  8. // MDI application design based on Chapter 7 of     
  9. // "Windows 3: A Developer's Guide" by Jeffrey Richter. 
  10. // 
  11. // Adaptation developed with permission of the author by  
  12. // John F. Holliday, Technisoft Corporation 
  13. // Telephone: (515) 472-9803, CompuServe: 71271,634 
  14. //
  15. // [DMM]    25-Nov-1992: Fixed crashing on exit
  16. //            Also tabified file to tabsize of 4
  17. //
  18. //            David M. Miller, Business Visions, Inc.
  19. //            Telephone: (212) 747-6118
  20. //            CompuServe: 72676,327
  21. //            internet: dmiller@hera.sbi.com
  22. // ==========================================================Private 
  23.  
  24. // Window procedure 
  25.  
  26. LRESULT CALLBACK _export Chart_WndProc(HWND, UINT, WPARAM, LPARAM);
  27.  
  28.  
  29. // Default message handler 
  30.  
  31. #define Chart_DefProc                DefMDIChildProc
  32.  
  33.  
  34. // Instance data structure 
  35.  
  36. typedef struct tagCHART {
  37.     HWND            hWnd;
  38.     HWND            hWndPrevChild;
  39.     HMENU            hMenu;
  40.     HANDLE            hAccelTable;
  41.     COLORREF        clrText;
  42.     LPCSTR            lpszText;
  43. }                CHART;
  44.  
  45.  
  46. // Instance data pointer access functions 
  47.  
  48. #if defined(M_I86SM) | defined(M_I86MM)
  49. #define Chart_GetPtr(hWnd)               (CHART*)GetWindowWord((hWnd), 0)
  50. #define Chart_SetPtr(hWnd, pchart)       (CHART*)SetWindowWord((hWnd), 0, (WORD)(pchart))
  51. #else
  52. #define Chart_GetPtr(hWnd)               (CHART*)GetWindowLong((hWnd), 0)
  53. #define Chart_SetPtr(hWnd, pchart)       (CHART*)SetWindowLong((hWnd), 0, (LONG)(pchart))
  54. #endif
  55.  
  56. // Message handler functions 
  57.  
  58. BOOL            Chart_OnCreate(CHART *, CREATESTRUCT FAR *);
  59. int                Chart_OnMouseActivate(CHART *, HWND, UINT, UINT);
  60. void            Chart_OnMenuSelect(CHART *, HMENU, int, HMENU, UINT);
  61. void            Chart_OnEnterIdle(CHART *, UINT, HWND);
  62. BOOL            Chart_OnSetCursor(CHART *, HWND, UINT, UINT);
  63. void            Chart_OnLButtonDown(CHART *, BOOL, int, int, UINT);
  64. void            Chart_OnClose(CHART *);
  65.  
  66. void            Chart_OnMdiActivate(CHART *, BOOL, HWND, HWND);
  67. void            Chart_OnDestroy(CHART *);
  68. void            Chart_OnPaint(CHART *);
  69. BOOL            Chart_OnEraseBkgnd(CHART *, HDC);
  70. BOOL            Chart_OnQueryEndSession(CHART *);
  71. void            Chart_OnEndSession(CHART *, BOOL);
  72. void            Chart_OnCommand(CHART *, int, HWND, UINT);
  73. void            Chart_OnPaintStatBar(CHART *, HDC, LPPAINTSTRUCT);
  74. void            Chart_OnPaintMenuHelp(CHART *, LPPAINTSTRUCT);
  75.  
  76.  
  77. // ===========================================================Public 
  78.  
  79. BOOL            Chart_Initialize(APP * papp);
  80. void            Chart_Terminate(APP * papp);
  81.  
  82. HWND            Chart_CreateWindow(HWND hWndParent, int x, int y, int cx, int cy, BOOL fVisible, COLORREF clrText, LPCSTR lpszText);
  83.  
  84. // ==============================================================End 
  85. #endif                            // !CLASS_CHART
  86.